﻿<!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="Bookmark" href="favicon.ico" >
<link rel="Shortcut Icon" href="favicon.ico" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/style.css" />
<link rel="stylesheet" href="static/ui/css/pagination.css">
<link rel="stylesheet" href="lib/zTree/v3/css/zTreeStyle/zTreeStyle.css" type="text/css">
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>IBSM基础数据管理平台</title>
<script type="text/javascript" src="static/ui/js/jquery-2.1.3.min.js"></script>
<script src="static/ui/js/jquery.cookie.js"></script>
<script src="static/ui/js/common.js"></script>
</head>
<body id="app">
<header class="navbar-wrapper">
	<div class="navbar navbar-fixed-top">
		<div class="container-fluid cl"> <a class="logo navbar-logo f-l mr-10 hidden-xs" href="jaavascript:void(0)">IBSM基础数据管理平台</a> <a class="logo navbar-logo-m f-l mr-10 visible-xs" href="jaavascript:void(0)">IBSM平台</a>
			<span class="logo navbar-slogan f-l mr-10 hidden-xs">v3.1</span>
			<a aria-hidden="false" class="nav-toggle Hui-iconfont visible-xs" href="javascript:;">&#xe667;</a>
			<nav class="nav navbar-nav"></nav>
			<nav id="Hui-userbar" class="nav navbar-nav navbar-userbar hidden-xs">
				<ul class="cl">
					<li class="dropDown dropDown_hover"> <a href="#" class="dropDown_A"><i class="Hui-iconfont">&#xe705;</i>{{userinfo.userName}}<i class="Hui-iconfont">&#xe6d5;</i></a>
						<ul class="dropDown-menu menu radius box-shadow">
							<!--<li><a href="javascript:;" onClick="myselfinfo()">个人信息</a></li>
							<li><a href="#">切换账户</a></li>-->
							<li><a href="javascript:logout();">退出</a></li>
				</ul>
			</li>
					<li id="Hui-msg"> <a href="#" title="消息"><span class="badge badge-danger">1</span><i class="Hui-iconfont" style="font-size:18px">&#xe68a;</i></a> </li>
					<li id="Hui-skin" class="dropDown right dropDown_hover"> <a href="javascript:;" class="dropDown_A" title="换肤"><i class="Hui-iconfont" style="font-size:18px">&#xe62a;</i></a>
						<ul class="dropDown-menu menu radius box-shadow">
							<li><a href="javascript:;" data-val="default" title="默认（黑色）">默认（黑色）</a></li>
							<li><a href="javascript:;" data-val="blue" title="蓝色">蓝色</a></li>
							<li><a href="javascript:;" data-val="green" title="绿色">绿色</a></li>
							<li><a href="javascript:;" data-val="red" title="红色">红色</a></li>
							<li><a href="javascript:;" data-val="yellow" title="黄色">黄色</a></li>
							<li><a href="javascript:;" data-val="orange" title="橙色">橙色</a></li>
				</ul>
			</li>
		</ul>
	</nav>
</div>
</div>
</header>
<aside class="Hui-aside">
	<div class="menu_dropdown bk_2" id="systemMenuBar"></div>
</aside>
<div class="dislpayArrow hidden-xs"><a class="pngfix" href="javascript:void(0);" onClick="displaynavbar(this)"></a></div>

<section class="Hui-article-box" id="content"></section>
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript" src="lib/zTree/v3/js/jquery.ztree.all-3.5.min.js"></script>
<script type="text/javascript" src="static/h-ui/js/H-ui.js"></script>
<script type="text/javascript" src="static/h-ui.admin/js/H-ui.admin.page.js"></script>
<script type="text/javascript" src="static/ui/js/jquery.pagination.js"></script>
<script language="javascript" type="text/javascript" src="lib/My97DatePicker/WdatePicker.js"></script>
<script src="static/ui/js/jquery.hashchange.js"></script>
<script src="static/ui/js/vue.js"></script>
<script src="static/ui/js/vue-resource.js"></script>
<script>
    var vm = new Vue({
        el:'#app',
        http: authorization(),
        data:{
            userinfo:{},
            backstage:{}
        },
        created:function(){
						this.$http.get('/restful/base/v1.0/auth/user/menus').then((response) => {
								var menuHtml = "";
								responseObj(response).data.forEach(function(menu){
									menuHtml += '<dl><dt><i class="Hui-iconfont">'+menu.ico+'</i> '+menu.name+'<i class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i></dt><dd>';
									if(menu.childs.length == 0){
											menuHtml += '<ul><li><a href="'+menu.uri+'" title="'+menu.name+'">'+menu.name+'</a></li></ul></dd></dl>';
									}else{
										menuHtml += "<ul>";
										menu.childs.forEach(function(menuCh){
											menuHtml += '<li><a href="'+menuCh.uri+'" title="'+menuCh.name+'">'+menuCh.name+'</a></li>';
										});
										menuHtml += '</ul></dd></dl>';
									}
								});
								$('#systemMenuBar').html(menuHtml);
								$(".Hui-aside").Huifold({
									titCell:'.menu_dropdown dl dt',
									mainCell:'.menu_dropdown dl dd',
								});
						}).catch(function(response) {
								console.log(errorMsg(response));
						});

            this.$http.get('/restful/base/v1.0/subscriber/operator').then((response) => {
                vm.userinfo = responseObj(response).data;
            }).catch(function(response) {
                console.log(errorMsg(response));
            });

            this.$http.get('/restful/base/v1.0/commmon/backstage/accredit/info').then((response) => {
                vm.backstage = responseObj(response).data;
            }).catch(function(response) {
                console.log(errorMsg(response));
            });

						this.$http.patch('/restful/base/v1.0/auth/user/data/auth/codes').then((response) => {
                recordDataAuth(responseObj(response).data);
            }).catch(function(response) {
                console.log(errorMsg(response));
            });
        }
    });

		$(function(){
        $(window).bind('hashchange', function(e) {
            if(location.hash != ''){
                var path = (location.hash+'').replace("#!","");
                if(path.length > 0){
                    loadPage(path);
                }else{
									$('#content').html('<section class="page-404 minWP text-c"><p class="error-title"><i class="Hui-iconfont va-m" style="font-size:80px">&#xe656;</i><span class="va-m">404</span></p><p class="error-description">不好意思，您访问的页面不存在~</p></section>');
								}
            }else{
                loadPage('workbench.html');
            }
        });
        $(window).trigger( 'hashchange' );

				document.getElementById("systemMenuBar").onclick = function(e){
            e = e || window.event;
            var target = e.srcElement || e.target,
                tagName = target.tagName.toLowerCase(),
                allLi = document.getElementById("systemMenuBar").getElementsByTagName("a");

            for(var i=0,len=allLi.length;i<len;i++){
                if(target == allLi[i]){
                    allLi[i].style.color = "#0978D1";
                }else{
                    allLi[i].style.color = "#000000";
                }
            }

        };
    });
</script>
</body>
</html>
